package com.csun.cmny.provider.model.dto.visitor;

import com.csun.cmny.provider.validator.OmcMonitorLogValidator;
import lombok.Data;

import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Pattern;
import javax.validation.constraints.Size;

@Data
public class visitorUpdateDto {

    @NotNull(message = "{visitor.id.null}")
    private Long id;





    /*咨询日期*/
    @Size(min = 1, max = 10, message = "{Monitorlog.date.length.error}",groups = {OmcMonitorLogValidator.class})
    @Pattern(regexp="^(?:(?!0000)[0-9]{4}-(?:(?:0[1-9]|1[0-2])-(?:0[1-9]|1[0-9]|2[0-8])"
            + "|(?:0[13-9]|1[0-2])-(?:29|30)|(?:0[13578]|1[02])-31)|(?:[0-9]{2}(?:0[48]|"
            + "[2468][048]|[13579][26])|(?:0[48]|[2468][048]|[13579][26])00)-02-29)$",
            message="{Advisory.date.pattem.error}")
    private String consultDate;

    /*咨询意向 0-准备入住 1-预定床位 2-了解情况*/
    private String intention;

    /**
     * 咨询人
     */
    private String consultName;

    /*与老人关系 0-夫妻 1-子女 2-兄弟姐妹 3-旁系亲属 4-朋友 5-其他*/
    private Integer relation;

    /*老人名字*/
    private String oldName;

    /*联系方式*/
    @Pattern(regexp = "^((\\+86)|(86))?(13|15|16|17|18|19)\\d{9}$",
            message = "{visitor.phone.error}")
    private String phone;

    /*备注*/
    private String remark;



    /*渠道id*/
    private Long channelId;
}
